﻿@using ccgstore.WebApp.Models
@model ccgstore.WebApp.ViewModels.ForumVm 
@{
    ViewBag.Title = "ForumCatgories";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Categories</h2>

@foreach (var category in Model.ForumCategories)
{
    <div>
        @Html.ActionLink(category.Name, "IndexCategory", "Forum", category)
        <div>
            Description
        </div>
    </div>
}

<h3>Threads</h3>

@Html.ActionLink("New Thread", "NewThread", "Forum")

<table>
    <tr>
        <th>Subject</th>
        <th>Original Poster</th>
        <th>Created On</th>
    </tr>

    @foreach (var thread in Model.GeneralThreads)
    {
        <tr>
            <td>@Html.ActionLink(thread.Subject, "ViewThread", "Forum", new { index = thread.ThreadId }, null)</td>
            <td></td>
            <td>@thread.CreateDt.DateTime</td>
        </tr>   
    }
</table>

